package com.example.arithmetic.round;

import java.util.LinkedList;

/**
 * 换瓶子
 *
 * @Auther: yaozhiqi
 * @Date: 2021/7/11 21:37
 */
public class Bottle {
    public static void main(String[] args) {
        System.out.println(converBottle(98));
    }

    /*最终能够换多少瓶*/
    static int bottleSize = 0;

    /**
     * 换瓶子
     * @param bottleCap 空瓶盖
     * @return
     */
    private static int converBottle(int bottleCap){
         int size = bottleCap / 3 ;
         int resSize = bottleCap % 3;
         bottleSize += size;
         if(resSize == 2){
             bottleSize ++;
             return bottleSize;
         }
         int i = converBottle(size + resSize);
         return bottleSize;
    }
}
